<extend name="Base/common"/>
<block name="header">
    <include file="Public/_nav"/>
    <link type="text/css" rel="stylesheet" href="__CSS__/wckc.css">
    <!-- <script type="text/javascript" src="__JS__/common.js"></script> -->
</block>


<block name="body">

      <!--   <include file="Public/_hot_sell"/> -->
        <!-- 左侧菜start -->
        <div class="col-xs-2">            
          <include file="Public/sidebar"  />
        </div>
        <!-- 左侧菜end -->
  <!--内容栏start-->
  <div class="col-md-10 content"> 
  <!--内容栏start-->
       <ul class="nav nav-tabs">
           <li><a href="{:U('Index/indexCourse')}"><i class="icon icon-th-large"> </i>五彩课程管理</a></li>
           <li><a href="{:U('Index/xbDocFiles')}"><i class="icon icon-th-large"> </i>课程资料库</a></li>
           <li><a href="{:U('Index/studentScore')}"><i class="icon icon-th-large"> </i>学生成绩</a></li>
           <li class="active"><a href="{:U('Index/exportCourseExcel')}"><i class="icon icon-th-large"> </i>导出各类表格</a></li>
       </ul>
       <div class="row">
            <div  class="with-padding">
                <div class="fl">
                    <a href="{:U('Wckc/Export/allCourseExcel')}" class="btn btn-ajax btn-success btn">导出各课程学生点名册</a>&nbsp;
                    <a class="btn btn-info btn" href="{:U('Wckc/Export/allCourseScoreExcel')}" >导出各课程成绩册</a>&nbsp;
                    <a href="{:U('Wckc/Export/renshuexcel',array('grade'=>$alist['grade']))}" class="btn btn-ajax btn-success btn">导出各班人数</a>&nbsp;
                    </div>
                </div>
           <div class="col-md-3">
           <br/>
              
             
          </div>

         <div class="col-md-5 col-md-offset-1">
         <h1 class="center" style="color:#CC4444">源自不同兴趣，成就不同精彩 </h1>
         </div>
        </div>
        <div class="clearfix"></div>
   

    <form class="form-horizontal" role="form" method="post" action="{:U('Export/CourseStudentExcel')}">
    <div><button type="submit" class="btn btn-primary" target-form="form-horizontal" onclick='submit'>导出各课程学生点名册</button></div> 
    <!-- Table start -->     
        <table class="table table-striped table-bordered" width="100%">
        <thead>
        <tr class="info">
            <th class="row-selected row-selected"><input class="check-all" type="checkbox" onclick="selectAll(this)" id="allCheck" checked /></th>
            <th class="text-center">序号</th><th class="text-center">类别</th><th class="text-center">名称</th><th class="text-center">任课教师</th><th class="text-center">面向年级</th><th class="text-center">报名人数</th><th class="text-center">场地</th><th class="text-center">操作</th>
        </tr>
        </thead>
        <volist name="data" id="cur" >
        <tr><td><input class="ids" type="checkbox" value="{$cur.cid}" name="ids[]"></td>
            <td>{$i}</td>
            <td>{$cur.category}</td>
            <td>{$cur.cname}</td>
            <td>{$cur.teacher}</td>
            <td>{$cur.grade}</td><td>{$cur.count}</td>
            <td>{$cur.room}</td><td>
            <a href= "{:U('My/upload?cid='.$cur['cid'])}" >上传资料</a>｜
            <a href= "{:U('Index/showCourse?cid='.$cur['cid'])}" >查看</a>｜
            <a href= "{:U('Index/edit?cid='.$cur['cid'])}" >编辑</a>｜
            <a href= "{:U('My/student?cid='.$cur['cid'])}" >学生</a></td>
            </tr>
        </volist>
        </table>
        </form>
      <!--/Table end-->


<script>
      //全选事件
            function selectAll(checkObj){
                $(".ids").prop("checked", $(checkObj).prop("checked"));
                // alert($(checkObj).prop("checked"));值为true、false
             }
            $(".ids").click();//反选即为每个复选框执行依次点击事件，即可实现反选
            //所有.itemSelect注册点击事件，注册点击事件的目的是在多选框被全选中的情况下，也能使多选按钮被选中。
            $(function() {
                $(".ids").click(function(){
                    $(".ids:checked").length == $(".ids").length ? $("#allCheck").prop("checked", true) : $("#allCheck").prop("checked", false);
                });
            });
            //反选事件：
            function reverseBtn(){
            }
    </script>




</block>